<template>
	<view>
		<view class="blue-bg">
			<view class="keywords-container">
				<view class="email-box">
					<input class="uni-input" focus type="text" v-model="mail" placeholder="请输入您要修改的邮箱地址" />
				</view>
				<view class="keywords-save">
					<button type="primary" @click="save">保存</button>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		
		data() {
			return {
				mail: ''
			};
		},
		onLoad: function(options) {
			var mail = options.mail;
			this.mail = mail;
		},
		methods: {
			
			save: function(e) {
				console.log(e);
				var pages = getCurrentPages();
				var prevPage = pages[pages.length - 2]; //上一个页面
				prevPage.mail = this.mail;
				uni.navigateBack();
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #ebebeb;
		height: 100%;
	}

	.blue-bg {
		background-color: #3b8bfe;
		height: 100rpx;
	}

	.keywords-container {
		background-color: #fff;
		border-radius: 20rpx;
		margin: 0 30rpx;
		padding-top: 20rpx;
		padding-bottom: 40rpx;
	}

	.email-box {
		border: 1rpx solid #b8b8b8;
		margin: 0 30rpx;
		border-radius: 10rpx;
		padding: 20rpx;
		box-sizing: border-box;
	}

	.keywords-save {
		display: flex;
		flex-direction: column;
		justify-content: center;
		margin-top: 40rpx;

		button {
			width: 90%;
			border-radius: 50rpx;
			background-color: #3b8bfe;
			font-size: 30rpx;
		}
	}
</style>
